<template>
  <c-back-wrap :loading="loading" go-page="市场开发/升级周进度跟进" current-page="详情">
    <Week :detail="detail" />
    <div class="btn-center">
      <c-button type="primary" @click="handleGoBack">返回</c-button>
    </div>
  </c-back-wrap>
</template>
<script>
import { weekTaskDetail } from '@/api/channelTask2/weekTask'
import Week from './week'
export default {
  name: 'Detail',
  components: {
    Week
  },
  props: {
    id: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      detail: {},
      loading: false
    }
  },
  created() {
    this.getDetailData()
  },
  methods: {
    getDetailData() {
      this.loading = true
      return weekTaskDetail(this.id).then(res => {
        this.detail = res.data
      }).finally(() => {
        this.loading = false
      })
    },
    handleGoBack() {
      this.$pageStack.pop()
    }
  }
}
</script>
